﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tesztlap</title>
</head>

<body>

<?php

/* TESTING USER.PHP */
/**/

include "config.php";
include "classes\mysql.php";
include "classes\user.php";

mysql::connect($config);

echo "teszt<br/>";
$temp = user::get_row(1);
$temp['username'] = "zzxlib";
$temp['email'] = "takraj@gmail.com";
$temp['favourites'] = "Egy nagy büdös \"PHP\" kód";
user::create($temp);

$temp = user::get_row(user::get_id("zzxlib"));
echo $temp['favourites'];

$temp['favourites'] = "Semmi más, mint a kaja... höhöhöhö :D";
user::update($temp);

$temp = user::get_row(user::get_id("zzxlib"));
echo "<br/>".$temp['favourites'];

user::delete(4);

echo "<br/>";
echo user::count_rows(user::get_table());
echo "<br/>";
echo user::count_rows(user::sort_table(user::get_table(),"username","zzxlib"));


?>

</body>
</html>